<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>$课堂练习$</title>
    <style>
        .cls {
            background-color: #000000;
        }
    </style>
</head>
<body>
<input type="button" value="关灯" id="btn">
<script src="common.js"></script>
<script>
    my$("btn").onclick = function () {
        //获取body标签
        document.body.className = document.body.className != "cls" ? "cls" : "";

    };
</script>
</body>
</html>
